﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类vGrid
	/// </summary>
	[Serializable]
	public class vGrid : Entity 
	{ 
		 public vGrid() 
            : base("vGrid") 
        { 

        }


		#region Model
		private int _UID;
		private int? _FormID;
		private int? _ViewID;
		private string _Code;
		private string _Name;
		private bool? _IsDisable;
		private bool? _IsSelect;
		private string _Note;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
		private string _Form;
		private string _ViewData;
		private string _UserCreate;
		private string _UserModify;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? FormID
		{
			get{ return _FormID; }
			set
			{
				this.OnPropertyValueChange(_.FormID,_FormID,value);
				this._FormID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? ViewID
		{
			get{ return _ViewID; }
			set
			{
				this.OnPropertyValueChange(_.ViewID,_ViewID,value);
				this._ViewID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Code
		{
			get{ return _Code; }
			set
			{
				this.OnPropertyValueChange(_.Code,_Code,value);
				this._Code = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Name
		{
			get{ return _Name; }
			set
			{
				this.OnPropertyValueChange(_.Name,_Name,value);
				this._Name = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsDisable
		{
			get{ return _IsDisable; }
			set
			{
				this.OnPropertyValueChange(_.IsDisable,_IsDisable,value);
				this._IsDisable = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Form
		{
			get{ return _Form; }
			set
			{
				this.OnPropertyValueChange(_.Form,_Form,value);
				this._Form = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ViewData
		{
			get{ return _ViewData; }
			set
			{
				this.OnPropertyValueChange(_.ViewData,_ViewData,value);
				this._ViewData = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserCreate
		{
			get{ return _UserCreate; }
			set
			{
				this.OnPropertyValueChange(_.UserCreate,_UserCreate,value);
				this._UserCreate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string UserModify
		{
			get{ return _UserModify; }
			set
			{
				this.OnPropertyValueChange(_.UserModify,_UserModify,value);
				this._UserModify = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.FormID,
				_.ViewID,
				_.Code,
				_.Name,
				_.IsDisable,
				_.IsSelect,
				_.Note,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate,
				_.Form,
				_.ViewData,
				_.UserCreate,
				_.UserModify
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_FormID,
				_ViewID,
				_Code,
				_Name,
				_IsDisable,
				_IsSelect,
				_Note,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate,
				_Form,
				_ViewData,
				_UserCreate,
				_UserModify
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "FormID":
                    this._FormID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ViewID":
                    this._ViewID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "Code":
                    this._Code = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Name":
                    this._Name = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsDisable":
                    this._IsDisable = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Form":
                    this._Form = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ViewData":
                    this._ViewData = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserCreate":
                    this._UserCreate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModify":
                    this._UserModify = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "FormID":
                    return this._FormID; 
				case "ViewID":
                    return this._ViewID; 
				case "Code":
                    return this._Code; 
				case "Name":
                    return this._Name; 
				case "IsDisable":
                    return this._IsDisable; 
				case "IsSelect":
                    return this._IsSelect; 
				case "Note":
                    return this._Note; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				case "Form":
                    return this._Form; 
				case "ViewData":
                    return this._ViewData; 
				case "UserCreate":
                    return this._UserCreate; 
				case "UserModify":
                    return this._UserModify; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","vGrid");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","vGrid","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FormID = new Field("FormID","vGrid","FormID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ViewID = new Field("ViewID","vGrid","ViewID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Code = new Field("Code","vGrid","Code");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Name = new Field("Name","vGrid","Name");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsDisable = new Field("IsDisable","vGrid","IsDisable");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","vGrid","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","vGrid","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","vGrid","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","vGrid","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","vGrid","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","vGrid","ModifyDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Form = new Field("Form","vGrid","Form");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ViewData = new Field("ViewData","vGrid","ViewData");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreate = new Field("UserCreate","vGrid","UserCreate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModify = new Field("UserModify","vGrid","UserModify");
		}
		#endregion

 
	}
}

